Use constant in XendDomainInfo rather than embedding a string literal.
authoremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 11:30:13 +0000 (12:30 +0100)
committeremellor@ewan <emellor@ewan>
Tue, 27 Sep 2005 11:30:13 +0000 (12:30 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendCheckpoint.py

index 51d0904245a64084a685817f9b30b3e225033198..b0e73a97c9fa9fcd4d6cc2c715702fb56c8b3327 100644 (file)
@@ -10,8 +10,12 @@ import select
 import sxp
 from string import join
 from struct import pack, unpack, calcsize
+
 from xen.util.xpopen import xPopen3
+
 import xen.lowlevel.xc
+
+import XendDomainInfo
 from xen.xend.xenstore.xsutil import IntroduceDomain
 
 from XendError import XendError
@@ -74,7 +78,7 @@ def save(xd, fd, dominfo, live):
                 if l.rstrip() == "suspend":
                     log.info("suspending %d" % dominfo.domid)
                     xd.domain_shutdown(dominfo.domid, reason='suspend')
-                    dominfo.state_wait("suspended")
+                    dominfo.state_wait(XendDomainInfo.STATE_VM_SUSPENDED)
                     log.info("suspend %d done" % dominfo.domid)
                     child.tochild.write("done\n")
                     child.tochild.flush()